<?php 

// Load post thumbnails functions:
add_theme_support('post-thumbnails', array('post'));

// Set content width
$content_width = 640;

// Load WP3 functions
//	- Custom header
//	- Custom navigation menu
//	- Automatic feed links
add_action('init', 'fazio_wp3_setup');

function fazio_wp3_setup()
{
	// Set default header options
	define('HEADER_TEXTCOLOR', '');
	define('HEADER_IMAGE', '%s/images/logo.png');
	define('HEADER_IMAGE_WIDTH', 255);
	define('HEADER_IMAGE_HEIGHT', 100);
	define('NO_HEADER_TEXT', true );

	// This enables custom image header
	add_custom_image_header('', 'admin_header_style');


	if(function_exists('register_default_headers'))
	{
		// Add default logo
		register_default_headers( array(
			'logo' => array(
				'url' => '%s/images/logo.png',
				'thumbnail_url' => '%s/images/logo.png',
				/* translators: default header image description */
				'description' => __( 'Default', 'fazio' )
			)
		));
	}


	// Enable post and comment RSS feed links in head
	add_theme_support('automatic-feed-links');
	
	if(function_exists('wp_nav_menu'))
	{
		// Enable custom nav menus
		add_theme_support('menus');
	
		// Register theme location
		register_nav_menu('header-menu', __('Header Menu', 'fazio'));
	}
}

// Gets included in acp - Extracted from twentyten
function admin_header_style() {
?>
	<style type="text/css">
		#headimg {
			width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
			height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
		}

		#headimg h1, #headimg #desc {
			display: none;
		}
	</style>
<?php
}